home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 116 / 116.d81 / secret identity (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  14KB  |  499 lines

  1. 5 dv=peek(186):ifdv<8thendv=8
  2. 10 goto8001
  3. 20 rem -- sir mix a lot --
  4. 30 qt=qt+1:ifqt>n%thenqt=1
  5. 32 rn%=rnd(1)*(n%-qt+1)+qt:a$=qt$(qt):b$=an$(qt)
  6. 35 qt$(qt)=qt$(rn%):an$(qt)=an$(rn%)
  7. 40 qt$(rn%)=a$:an$(rn%)=b$
  8. 45 return
  9. 46 rem -- print question --
  10. 50 print"[154]what@is@the@secret@identity@of..."
  11. 55 fori=1to6:ch$(i)="":next
  12. 60 cn%=(rnd(1)*6+1):ch$(cn%)=an$(qt)
  13. 65 fori=1to6:ifch$(i)<>""then90
  14. 70 rn%=rnd(1)*n%+1:ifan$(rn%)=an$(qt)then70
  15. 75 fl=0:forj=1toi:ifch$(j)=an$(rn%)thenfl=1:j=i
  16. 80 next:ifflthen70
  17. 85 ch$(i)=an$(rn%)
  18. 90 next
  19. 91 print"[154]"qt$(qt)"?"
  20. 92 poke214,2:print
  21. 94 fori=1to6:printtab(6)"[158]"ch$(i):next
  22. 96 print"[154]press@a@key@(1-6)@@press@(q)@to@quit"
  23. 98 return
  24. 100 rem -- game screen --
  25. 110 poke53280,0:poke53281,.:poke53283,2
  26. 115 poke53265,peek(53265)or64
  27. 120 print"[147]^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
  28. 130 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
  29. 140 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
  30. 150 print"______________________________________"
  31. 160 fori=1to6
  32. 170 print"^^^^^^^^^^^^^^^^^^^^^"
  33. 180 print"[153]"i"[157][157][157]@@[158]@@@@@@@@@@@@@@@@@@"
  34. 190 print"___[129]__________________"
  35. 200 next
  36. 210 print"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^"
  37. 220 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
  38. 230 print"______________________________________"
  39. 240 poke214,4:print
  40. 250 fori=1to4
  41. 260 printtab(25)"^^^^^^^^^^^^^"
  42. 270 printtab(25)"[150]@@@@@@@@@@@@@"
  43. 280 printtab(25)"[150]@@@@@@@@@@@@@"
  44. 290 printtab(25)"_____________"
  45. 300 next
  46. 310 poke214,5:print
  47. 320 printtab(27)"[150]question#"
  48. 325 printtab(30)"000"
  49. 330 printtab(26)"point@value"
  50. 335 printtab(29)"00000"
  51. 340 printtab(29)"score"
  52. 345 printtab(29)"00000"
  53. 350 printtab(32-len(nm$)/2)""nm$
  54. 355 printtab(29)"00000[145]"
  55. 360 a$=str$(ts):printtab(35-len(a$))"[150]"right$(a$,len(a$)-1)
  56. 370 return
  57. 400 rem -- question number --
  58. 410 poke214,6:print
  59. 420 a$=str$(qn):printtab(34-len(a$))"[150]"right$(a$,len(a$)-1)
  60. 430 return
  61. 450 rem -- point value --
  62. 460 poke214,10:print
  63. 470 a$=str$(pv):printtab(35-len(a$))"[150]"right$(a$,len(a$)-1)
  64. 480 return
  65. 500 rem -- score --
  66. 510 poke214,14:print
  67. 520 a$=str$(sc):printtab(35-len(a$))"[150]"right$(a$,len(a$)-1)
  68. 530 return
  69. 600 rem -- erase --
  70. 610 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
  71. 620 fori=1to6:printtab(6)"[158]@@@@@@@@@@@@@@@@":next
  72. 630 print"[154]@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"
  73. 640 return
  74. 650 rem -- quit --
  75. 660 poke214,22:print
  76. 665 print" @@@@@@do@you@want@to@quit?@(y/n)@@@@@@[145]"
  77. 670 geta$:ifa$="y"then15010
  78. 680 ifa$<>"n"then670
  79. 685 print" @press@a@key@(1-6)@@press@(q)@to@quit@"
  80. 690 goto2020
  81. 700 rem -- highlight correct answer --
  82. 710 poke214,cn%*3+2:print"[158]"
  83. 720 fori=1to2
  84. 730 printtab(6)"[145]"an$(qt):gosub1410:forde=1to250:next
  85. 740 printtab(6)"[145]"an$(qt):forde=1to200:next
  86. 750 next
  87. 760 printtab(6)"[145]"an$(qt):gosub1410:forde=1to800:next
  88. 770 return
  89. 775 :
  90. 780 poke214,cn%*3+2:print
  91. 785 printtab(6)"[145][158]"an$(qt):gosub1230
  92. 786 return
  93. 790 rem -- bonus prompt --
  94. 792 poke214,22:print
  95. 793 print"[154] @@bonus@if@you@answer@next@question!"
  96. 794 forde=1to1500:next
  97. 798 return
  98. 800 rem -- the questioner --
  99. 810 printtab(tb)"[192][193][194]";
  100. 820 printspc(36)"[195][196][154][197][198][199]";
  101. 830 printspc(34)"[200][201][202][203][204][205][206]";
  102. 840 printspc(33)"[207][208][209][210][211][212][213]";
  103. 850 printspc(32)"[214][215][216][217] [218][219][220][221]";
  104. 860 printspc(31)"[255][223][161][162] [163][164][165][166]";
  105. 870 printspc(31)"[167][168][169][170][171][172][173][174][175]";
  106. 880 printspc(31)"[176][177][178][179] [180][181][182][183]";
  107. 890 printspc(31)"[184][185][186][187] [188][189][190][191]";
  108. 900 printspc(31)"[192][193][194][195][196][197][198][199][200]";
  109. 910 printspc(32)"[201][202][160][160][160][203][204]"
  110. 920 return
  111. 950 rem -- right hook --
  112. 960 poke214,8:print""
  113. 970 printtab(21)" [205][206][207][146][204][205][206]"
  114. 980 printtab(21)"[208][209][210][211][146][211][212][213]"
  115. 990 printtab(20)" [212][213][214][146] [218][219][220][221]"
  116. 1000 printtab(20)" [215][216][146][162] [163][164][165][166]"
  117. 1010 printtab(20)" [217][146][169][170][171][172][173][174][175]"
  118. 1020 return
  119. 1050 rem -- left hook --
  120. 1060 poke214,8:print""
  121. 1070 printtab(21)"[200][201][202][218][219][220][160]"
  122. 1080 printtab(21)"[207][208][209][221][255][223][161]"
  123. 1090 printtab(20)"[214][215][216][217] [162][163][164][160]"
  124. 1100 printtab(20)"[255][223][161][162] [163][165][166][160]"
  125. 1110 printtab(20)"[167][168][169][170][171][172][173][167][160]"
  126. 1120 return
  127. 1200 rem -- clear sid chip --
  128. 1210 fori=.to24:pokes+i,.:next:return
  129. 1220 rem -- correct sound --
  130. 1230 pokes+24,15:pokes+6,225:pokes+4,17
  131. 1240 fori=1to7:forde=1to180step20
  132. 1250 pokes+1,de:next:next
  133. 1260 pokes+4,0:return
  134. 1300 rem -- wrong sound --
  135. 1310 pokes+24,15:pokes+5,129:pokes+6,129
  136. 1320 pokes+3,145:pokes+4,33:pokes+1,14
  137. 1330 forde=1to100:next
  138. 1340 fori=14to3step-1
  139. 1350 pokes+1,i:forde=.to18:next
  140. 1360 next:pokes+4,32
  141. 1370 return
  142. 1400 rem -- bell --
  143. 1410 pokes+2,.:pokes+3,8:pokes+5,.:pokes+6,252
  144. 1420 pokes+24,7:pokes,134:pokes+1,20
  145. 1430 pokes+4,65:forde=.to100:next
  146. 1440 pokes+4,64:return
  147. 1450 rem -- thwack --
  148. 1460 pokes+24,15:pokes+1,rnd(1)*20+10
  149. 1470 pokes+5,20:pokes+6,0:pokes+4,129
  150. 1480 forde=.to50:next:pokes+4,0
  151. 1490 return
  152. 1500 rem -- beep --
  153. 1510 pokes+1,50:pokes+6,240:pokes+24,15
  154. 1520 pokes+4,17:forde=1to300:next
  155. 1530 pokes+4,0:return
  156. 1600 rem -- a new high score! --
  157. 1610 fori=1to3:forj=1to3
  158. 1620 pokes+5,62:pokes+6,48
  159. 1630 pokes+1,j*3+6:pokes,54
  160. 1640 pokes+4,33:forde=1to108:next
  161. 1650 pokes+4,32::forde=1to10:next
  162. 1660 next:next:return
  163. 1900 rem --- check drive ---
  164. 1910 open15,dv,15,"r0:"+f$+"="+f$:input#15,er:close15
  165. 1920 return
  166. 2000 rem -- main --
  167. 2010 ifbg=3thengosub1510:gosub792
  168. 2015 gosub30:gosub410:gosub460:gosub510:gosub50
  169. 2020 geta$:ifa$<"1"ora$>"6"anda$<>"q"then2020
  170. 2025 ifa$="q"then660
  171. 2030 an=val(a$):ifch$(an)=an$(qt)then2110
  172. 2040 rem -- wrong answer --
  173. 2050 gosub1310:gosub710:pv=50:bg=0
  174. 2060 poke214,10:print:printtab(29)"[150]00050"
  175. 2070 goto2200
  176. 2100 rem -- correct answer --
  177. 2110 gosub780:sc=sc+pv:gosub510:pv=pv+50
  178. 2115 forde=1to1000:next
  179. 2120 bg=bg+1:ifbg=4thenbg=0:gosub4010
  180. 2200 qn=qn+1:ifqn>20then6010
  181. 2210 gosub610:goto2010
  182. 4000 rem -- bonus screen --
  183. 4010 poke53280,0:poke53281,0:print"[147]"
  184. 4020 poke53265,peek(53265)and191
  185. 4030 print" [160]oops![160]"
  186. 4040 c$="[156][150][129][158][159][153]"
  187. 4050 fori=1to7
  188. 4060 printmid$(c$,i,1)" [160][160][160][160][160][160][160]"
  189. 4070 print" [160]"bn$(i*3)"[160]"
  190. 4080 printmid$(c$,i,1)" [160][160][160][160][160][160][160]"
  191. 4090 next
  192. 4100 print" [155][160]start[160]\"
  193. 4110 printtab(16)"[158][160]the[160]bonus[160]game![160]"
  194. 4120 printtab(13)"^^^^^^^^^^^^^^^^^^^^^^^"
  195. 4130 printtab(13)"[154][160]"chr$(34)"press[160]down[160]spacebar"chr$(34)"[160]"
  196. 4140 printtab(13)"_______________________"
  197. 4150 poke214,18:print
  198. 4160 printtab(13)"^^^^^^^^^^^^^^^^^^^^^^^"
  199. 4170 printtab(13)"[154][160]"chr$(34)"release[160]when[160]ready!"chr$(34)"[160]"
  200. 4180 printtab(13)"_______________________"
  201. 4190 printtab(16)"[150][160][160]bonus[160]=[160]00000[160][160]"
  202. 4200 poke214,6:print:tb=23:gosub810
  203. 4210 bn=22:ifpeek(197)<>60then4210
  204. 4220 bn=bn-1:ifbn<0thenbn=0
  205. 4230 forde=1to70:next
  206. 4240 ifpeek(197)=60then4220
  207. 4250 fori=21tobnstep-1
  208. 4260 x=-(x=0):ifxthengosub1060:goto4280
  209. 4270 gosub960
  210. 4280 poke214,i:print:printtab(8)" [145][157]\"
  211. 4290 poke214,22:print"[150]"
  212. 4300 printtab(31-len(bn$(i)))bn$(i)
  213. 4310 gosub1460:poke214,6:print
  214. 4320 gosub810:forde=1to100:next
  215. 4330 next
  216. 4400 b$=bn$(i+1):bn=val(b$):ifbn=0thengosub1310:goto4420
  217. 4410 gosub1230
  218. 4420 forde=1to2000:next
  219. 4430 ifprthenreturn
  220. 4440 rem -- print bonus --
  221. 4445 gosub110:gosub410:gosub460:gosub510
  222. 4450 ifbn=0thenreturn
  223. 4460 poke214,10:print
  224. 4470 fori=1to3:printtab(13)"[159]@@@@@@@@@@@@@@":next
  225. 4480 printtab(14)"[145][145]bonus@=@"right$(b$,len(b$)-1):forde=1to500:next
  226. 4490 pokes+6,200:pokes+1,0:pokes+24,15
  227. 4500 fori=10tobnstep10:pokes+4,17:pokes+1,i/10:sc=sc+10:gosub510:pokes+4,0:next
  228. 4510 gosub1230:forde=1to500:next
  229. 4520 poke214,10:print
  230. 4530 printtab(13)"[158]@@@@@@@@@@  [150]@@"
  231. 4540 printtab(13)"[129]__________  __"
  232. 4550 printtab(13)"^^^^^^^^^^  ^^"
  233. 4560 return
  234. 6000 rem -- game over --
  235. 6010 poke53281,.:poke53